﻿using System;
using System.Drawing;

namespace WiMo.Games.Premium.GDIDisplay.ImageAPI
{
    static partial class GraphicsExtension
    {

        public static void DrawLine(this Graphics gx, Color color, int x1, int y1, int x2, int y2)
        {
            DrawLine(gx, color, 1, x1, y1, x2, y2);
        }

        public static void DrawLine(this Graphics gx, Color color, int width, int x1, int y1, int x2, int y2)
        {
            using (var pen = new Pen(color.ToDrawingColor(), width))
                gx.DrawLine(pen, x1, y1, x2, y2);
        }

    }
}
